<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: wulimin
  Date: 2022/3/27
  Time: 23:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户管理</title>
</head>
<body>
<h2 align="center">用户管理</h2>

<form action="${pageContext.request.contextPath}/user/findAll" method="get">
    <input type="text" name="keyword" value="" />
    <input type="submit" value="模糊查询" />
</form>

<table width="80%" align="center" cellspacing="0" border="1px">
    <tr>
        <td>编号</td>
        <td>姓名</td>
        <td>密码</td>
        <td>手机号</td>
        <td>注册时间</td>
        <td>操作</td>

    </tr>
    <c:forEach var="user" items="${requestScope.users}">
        <tr>
            <td><c:out value="${user.uid}"></c:out></td>
            <td><c:out value="${user.username}"></c:out></td>
            <td><c:out value="${user.password}"></c:out></td>
            <td><c:out value="${user.phone}"></c:out></td>
            <td><c:out value="${user.createtime}"></c:out></td>
            <td>
                <a href="${pageContext.request.contextPath}/user/detail?id=<c:out value="${user.uid}"></c:out>">编辑</a>|
                <a href="${pageContext.request.contextPath}/user/deleteUser?id=<c:out value="${user.uid}"></c:out>">删除</a>
            </td>
        </tr>

    </c:forEach>
</table>
<div align="right"><span><a href="${pageContext.request.contextPath}/register.jsp">注册新会员</a></span></div>
</body>
</html>
